.class public Lcom/h2/org/springframework/beans/factory/config/DefaultPlaceholderResolver;
.super Ljava/lang/Object;
.source "DefaultPlaceholderResolver.java"

# interfaces
.implements Lorg/springframework/beans/factory/config/PropertyPlaceholderConfigurer$PlaceholderResolver;


# static fields
.field public static final DEFAULT_PLACEHOLDER_PREFIX:Ljava/lang/String; = "${"

.field public static final DEFAULT_PLACEHOLDER_SUFFIX:Ljava/lang/String; = "}"


# direct methods
.method public constructor <init>()V
    .locals 0

    .prologue
    .line 7
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method


# virtual methods
.method public getPlaceholder(Ljava/lang/String;)Ljava/lang/String;
    .locals 1
    .parameter "strVal"

    .prologue
    .line 44
    const/4 v0, 0x0

    return-object v0
.end method

.method public resolvePlaceholder(Ljava/lang/String;)Ljava/lang/String;
    .locals 8
    .parameter "strVal"

    .prologue
    const/4 v6, -0x1

    .line 22
    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0, p1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    .line 24
    .local v0, buf:Ljava/lang/StringBuilder;
    const-string v5, "${"

    invoke-virtual {p1, v5}, Ljava/lang/String;->indexOf(Ljava/lang/String;)I

    move-result v3

    .line 25
    .local v3, startIndex:I
    if-eq v3, v6, :cond_0

    .line 26
    const-string v5, "}"

    invoke-virtual {p1, v5}, Ljava/lang/String;->lastIndexOf(Ljava/lang/String;)I

    move-result v1

    .line 27
    .local v1, endIndex:I
    if-eq v1, v6, :cond_0

    .line 28
    const-string v5, "${"

    invoke-virtual {v5}, Ljava/lang/String;->length()I

    move-result v5

    add-int/2addr v5, v3

    invoke-virtual {v0, v5, v1}, Ljava/lang/StringBuilder;->substring(II)Ljava/lang/String;

    move-result-object v2

    .line 31
    .local v2, placeholder:Ljava/lang/String;
    invoke-virtual {p0, v2}, Lcom/h2/org/springframework/beans/factory/config/DefaultPlaceholderResolver;->getPlaceholder(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v4

    .line 32
    .local v4, val:Ljava/lang/String;
    if-eqz v4, :cond_1

    .line 33
    const-string v5, "}"

    invoke-virtual {v5}, Ljava/lang/String;->length()I

    move-result v5

    add-int/2addr v5, v1

    invoke-virtual {v0, v3, v5, v4}, Ljava/lang/StringBuilder;->replace(IILjava/lang/String;)Ljava/lang/StringBuilder;

    .line 40
    .end local v1           #endIndex:I
    .end local v2           #placeholder:Ljava/lang/String;
    .end local v4           #val:Ljava/lang/String;
    :cond_0
    :goto_0
    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v5

    return-object v5

    .line 35
    .restart local v1       #endIndex:I
    .restart local v2       #placeholder:Ljava/lang/String;
    .restart local v4       #val:Ljava/lang/String;
    :cond_1
    const-string v5, "DefaultPlaceholderResolver"

    new-instance v6, Ljava/lang/StringBuilder;

    const-string v7, "Placeholder not found: "

    invoke-direct {v6, v7}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v6, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v6

    invoke-virtual {v6}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v6

    invoke-static {v5, v6}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I

    goto :goto_0
.end method
